import axios from 'axios'

const rootUrl = '/webTender'

export function postBids(title, deadline, itemNum, content, token) {
  const url = rootUrl

  return axios({
    method: 'POST',
    url,
    data: {
      title,
      deadline,
      itemNum,
      content
    },
    headers: {
      'Authorization': `Bearer ${token}\n`
    }
  }).then((res) => {
    return Promise.resolve(res.data)
  }).catch((err) => {
    return Promise.reject(err)
  })
}
